import request from "@/utils/request";

export const TBizcEneryEquipApi={
  contextPath: '/equip', //按照实际应用修改成微服务的名�?//
  page: (data)=>{ //分页查询//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-en-wz-equip/page',
      method: 'POST',
      data: data
    })
  },
  update: (data)=>{ //更新多条数据//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-en-wz-equip/update',
      method: 'POST',
      data: data
    })
  },
  insert: (data)=>{ //新增多条数据//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-en-wz-equip/insert',
      method: 'POST',
      data: data
    })
  },
  delete: (data) =>{ //删除多条数据//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-bizc-enery-equip/delete',
      method: 'POST',
      data: data
    })
  },
  getById: (id) =>{ //通过主键查询多条数据//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-en-wz-equip/'+id,
      method: 'POST'
    })
  },
  exportXls: (data)=>{ //导出//
    return requestDownload({
      url: TBizcEneryEquipApi.contextPath+'/export/export-page',
      method: 'POST',
      data: data,
      responseType: 'blob'
    })
  },
  queryDictData: (code)=>{ //字典//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/t-en-interface-code/queryLeaf?code='+code,
      method: 'POST',
      // data: code
    })
  },
  excelImport: (data)=>{ //导入//
    return request({
      url: TBizcEneryEquipApi.contextPath+'/export/excelImport',
      method: 'POST',
      data: data,
      headers: {'Content-Type': 'multipart/form-data'}
    })
  },
  queryDictDatasb: (code) => { //获取设备类型
    return request({
      url:TBizcEneryEquipApi.contextPath + '/t-en-wz-sblx/getList?pid='+code,
      method: 'POST',
      // data: code
    })
  },

}
